<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>编号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="编号" ng-model="param.data.code" required ng-readonly="param.type=='update'" ng-maxlength="6"
						/>
					</div>
					<p ng-show="param.type=='insert'">最大长度6位，字母与数字任意组合，唯一不可重复。</p>
					<p ng-show="param.type=='update'">不可修改。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>基础单价：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="单价" ng-pattern="/^\d+(\.\d+)?$/" ng-model="param.data.price" required/>
					</div>
					<p>单价（元/人）</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>附加价：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="附加价" ng-pattern="/^\d+(\.\d+)?$/" ng-model="param.data.priceEx" required/>
					</div>
					<p>附加价（元/人）,不参与折扣计算</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>价格折扣倍率：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="折扣倍率" ng-pattern="/^\d+(\.\d+)?$/" ng-model="param.data.incrRatio" required/>
					</div>
					<p>必须为整数,人数递增,价格折扣倍率（百分数）,为0表示无折扣</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>4人包车折扣价：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="4人包车折扣价" ng-pattern="/^\d+(\.\d+)?$/" ng-model="param.data.discount1" required/>
					</div>
					<p>必填，单位（元）。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>6人包车折扣价：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="6人包车折扣价" ng-pattern="/^\d+(\.\d+)?$/" ng-model="param.data.discount2" required/>
					</div>
					<p>必填，单位（元）。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">价格计算公式：</label>
					<div class="col-sm-7">
						<p>人数等于1（拼车），总价=单价+附加价；</p>
						<p>人数大于1（拼车）：总价=人数*单价-人数*单价*折扣倍率/100+人数*附加价；</p>
						<p>包车：总价=人数*单价-折扣（4/6人折扣）+人数*附加价。</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">人数：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="人数" ng-model="number" ng-pattern="/^[0-9]*$/" maxlength="2" />
					</div>
					<button type="submit" class="btn btn-info" ng-click="rule()">验证定价规则</button>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">总价：</label>
					<div class="col-sm-5">
						<p style="margin-top: 7px">拼车：{{total | number:2}}元</p>
						<p style="margin-top: 7px">包车：{{mono | number:2}}元</p>
					</div>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>